﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoyoEden.Models;

namespace CoyoEden.Web.Controls
{
	/// <summary>
	/// 
	/// </summary>
	public class VoteViewBase:ViewBase
	{
		#region properties
		/// <summary>
		/// THe Vote for the topic view
		/// </summary>
		public Vote TheVote
		{
			get;
			set;
		}
		/// <summary>
		/// Votes for VoteListView.ascx
		/// </summary>
		public List<Vote> VotesShow { get; set; }
		/// <summary>
		/// Vote Items for showing.Used in VoteDetailVoteItemList.ascx
		/// </summary>
		public List<Rate> VoteItemsShow
		{
			get;
			set;
		}
		/// <summary>
		/// Vote Items's Html,Used in VoteDetail.ascx
		/// </summary>
		public string VoteItemsShowHtml { get; set; }
		/// <summary>
		/// Posts for the vote.Used in VoteDetailVoteItemCandidate.ascx
		/// </summary>
		public List<Post> PostsForVote
		{
			get;
			set;
		}
		#endregion

		#region Readonly Properties
		/// <summary>
		/// Current vote's absolute Url.Readonly
		/// </summary>
		public string Url
		{
			get
			{
				var url = Utils.AbsoluteWebRoot + "Vote/" + TheVote.Id.ToString() + ".aspx";
				return url;
			}
		}
		#endregion
	}
}
